<?php

function add_some_extra(&$string)
{
    $string .= 'and something extra.';
}
$str = 'This is a string, ';
add_some_extra($str);
echo $str;  
echo "\r\n";
echo "<br>";  

function makecoffee($type = "cappuccino")
{
    return "Making a cup of $type.\r\n";
}
echo makecoffee();
echo "<br>";  
echo makecoffee(null);
echo "<br>";  
echo makecoffee("espresso");
echo "<br>";  


function sum() {
    $acc = 0;
    foreach (func_get_args() as $n) {
        $acc += $n;
    }
    return $acc;
}

echo sum(1, 2, 3, 4);










?>

















